#!/usr/bin/env python
# -*- coding: utf-8 -*-
#类似shell把编码给调整过来了。
import  xml.dom.minidom
import os 
import sys
filename1 = sys.argv[1]
filename2 =sys.argv[2]
cmd1 =r'perl -p -i -e "s/GB2312/utf-8/g"  ' + filename1
os.system(cmd1)
#print cmd1
cmd2 =r'iconv -f GB18030 -t utf-8 ' +filename1 +' -o '  + filename2
os.system(cmd2)
#print cmd2
